FROM python
RUN mkdir /app
COPY . /app
COPY requirements.txt /app
RUN pip install -r /app/requirements.txt -i https://pypi.douban.com/simple
WORKDIR /app/src
RUN chmod 777 /app/allure/bin/allure
RUN pytest $env -q --alluredir ../allure-results --clean-alluredir
#  $env: 根据传递的arg参数指定运行的项目用例
# cases_app                  app
# cases_client               客户端
# cases_integrated           一体化
# cases_laboratory           试验室
# cases_metering             web计量
# 命令, 如: docker build build-arg env=cases_app
